package com.my.test;

import com.my.config.UserConfig;
import com.my.service.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author: marshal
 * @date: 2023-05-15 15:35
 */
public class UserApp {
    @Test
    public void test() {
        ApplicationContext context = new AnnotationConfigApplicationContext(UserConfig.class);
        UserService userService = context.getBean("userService", UserService.class);
        System.out.println(userService.findUsers());
    }
}
